/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package colloque.helpers;

import javax.servlet.http.HttpSession;

/**
 *
 * @author James
 */
public class SecurityHelper {

    private HttpSession session;

    /**
     *
     * @param session
     */
    public SecurityHelper(HttpSession session) {
        this.session = session;
    }

    /**
     * Retourne vrai si l'utilisateur est connecté 
     * 
     * @return 
     */
    public boolean isAuthenticated() {
        if (session.getAttribute("sessionUtilisateur") == null) {
            return false;
        } else {
            return true;
        }

    }
}
